Optimal. Leaf size=52 \[ \frac {(a B+A b) \sin (c+d x)}{d}+\frac {1}{2} x (2 a A+b B)+\frac {b B \sin (c+d x) \cos (c+d x)}{2 d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.02, antiderivative size = 52, normalized size of antiderivative = 1.00, number of steps used = 1, number of rules used = 1, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.048, Rules used = {2734} \[ \frac {(a B+A b) \sin (c+d x)}{d}+\frac {1}{2} x (2 a A+b B)+\frac {b B \sin (c+d x) \cos (c+d x)}{2 d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2734
Rubi steps
\begin {align*} \int (a+b \cos (c+d x)) (A+B \cos (c+d x)) \, dx &=\frac {1}{2} (2 a A+b B) x+\frac {(A b+a B) \sin (c+d x)}{d}+\frac {b B \cos (c+d x) \sin (c+d x)}{2 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.09, size = 51, normalized size = 0.98 \[ \frac {4 (a B+A b) \sin (c+d x)+4 a A d x+b B \sin (2 (c+d x))+2 b B c+2 b B d x}{4 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.79, size = 42, normalized size = 0.81 \[ \frac {{\left (2 \, A a + B b\right )} d x + {\left (B b \cos \left (d x + c\right ) + 2 \, B a + 2 \, A b\right )} \sin \left (d x + c\right )}{2 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.30, size = 45, normalized size = 0.87 \[ \frac {1}{2} \, {\left (2 \, A a + B b\right )} x + \frac {B b \sin \left (2 \, d x + 2 \, c\right )}{4 \, d} + \frac {{\left (B a + A b\right )} \sin \left (d x + c\right )}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.05, size = 57, normalized size = 1.10 \[ \frac {B b \left (\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+A b \sin \left (d x +c \right )+a B \sin \left (d x +c \right )+a A \left (d x +c \right )}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.60, size = 55, normalized size = 1.06 \[ \frac {4 \, {\left (d x + c\right )} A a + {\left (2 \, d x + 2 \, c + \sin \left (2 \, d x + 2 \, c\right )\right )} B b + 4 \, B a \sin \left (d x + c\right ) + 4 \, A b \sin \left (d x + c\right )}{4 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.36, size = 50, normalized size = 0.96 \[ A\,a\,x+\frac {B\,b\,x}{2}+\frac {A\,b\,\sin \left (c+d\,x\right )}{d}+\frac {B\,a\,\sin \left (c+d\,x\right )}{d}+\frac {B\,b\,\sin \left (2\,c+2\,d\,x\right )}{4\,d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.25, size = 94, normalized size = 1.81 \[ \begin {cases} A a x + \frac {A b \sin {\left (c + d x \right )}}{d} + \frac {B a \sin {\left (c + d x \right )}}{d} + \frac {B b x \sin ^{2}{\left (c + d x \right )}}{2} + \frac {B b x \cos ^{2}{\left (c + d x \right )}}{2} + \frac {B b \sin {\left (c + d x \right )} \cos {\left (c + d x \right )}}{2 d} & \text {for}\: d \neq 0 \\x \left (A + B \cos {\relax (c )}\right ) \left (a + b \cos {\relax (c )}\right ) & \text {otherwise} \end {cases} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________